Skip to content

Conversation

colerogers
Copy link
Contributor

Replaces onAutomatedPlanUpdatePublished() with the correct onPlanAutomatedUpdatePublished() in billing alerts.

@colerogers colerogers requested a review from inlined February 21, 2022 14:47
Copy link
Contributor

@taeold taeold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change

export const automatedPlanUpdateAlert = 'billing.automatedPlanUpdate';
too.

});
});

describe('onAutomatedPlanUpdatePublished', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
describe('onAutomatedPlanUpdatePublished', () => {
describe('onPlanAutomatedUpdatePublished', () => {

export const planUpdateAlert = 'billing.planUpdate';
/** @internal */
export const automatedPlanUpdateAlert = 'billing.automatedPlanUpdate';
export const planAutomatedUpdateAlert = 'billing.automatedPlanUpdate';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh this is bit odd. The event type is still automatedPlanUpdate not planAutomatedUpdate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checked the alert type string, it's set to billing.automatedPlanUpdate. Since all their other methods and structures have this as planAutomatedUpdate, I'm going to request that they change this value on the provider end. I'll leave this PR up until it gets sorted out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's in the spec? IDK if we should differ between the alerttype and the handler function name. It just seemed odd that this isn't object -> verb naming.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inlined @taeold I just submitted a change to the alerttype parameter to set the value to billing.planAutomatedUpdate

@colerogers colerogers requested a review from taeold March 4, 2022 00:20
@colerogers colerogers merged commit c09761a into master Mar 4, 2022
@colerogers colerogers deleted the colerogers.fix-billing-typo branch March 4, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants